
export default {
  namespaced: true,

  state: {
    user:{
      avatarUrl:'',
      count: 0,
      createdTime: '',
      email:'',
      phone:'',
      sex: 0,
      nickname:'',
      realName:'',
      signature:'',
      id:''
    },
  },
  getters: {
  },
  mutations: {
    // 更换头像
    updateUserAvatarUrl(state, avatarUrl){
      state.user.avatarUrl = avatarUrl
    },
    // 更新user
    updateUser(state, user){
      state.user = user
    },
    // 更改个人信息
    updateUserFrom(state, user){
      state.user.email = user.email
      state.user.phone = user.phone
      state.user.nickname = user.nickname
      state.user.realName = user.realName
      state.user.signature = user.signature
    },
    // 修改次数
    updateCount(state) {
      state.count = state.count--
    }
  },
  actions: {
  },
  modules: {
  }
}